<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<!-- 1.如果没有具名插槽,那么每个slot都会被替换为标题 -->	
<!-- 		<cpn>
				<span>标题</span>
			</cpn> -->
			<!-- 2.通过slot属性指定对应的插槽 -->
			<cpn><span slot="center">标题</span></cpn>
			<!--  -->
		</div>
		
	</body>
	<template id="cpn">
		<div>
			<slot name="left"><span>左边</span></slot>
			<slot name="center"><span>中间</span></slot>
			<slot name="right"><span>右边</span></slot>
		</div>
	</template>
	<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		const cpn = {
			template: "#cpn",
			
		}
		const app = new Vue({
			el : "#app",
			data:{
				
			},
			components:{
				cpn
			}
		})
	</script>
</html>
